package experiment1_bag;
import java.util.Scanner;
public class bidaxiao {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入第一个整数: ");
        int num1 = scanner.nextInt();
        System.out.print("请输入第二个整数: ");
        int num2 = scanner.nextInt();
        System.out.print("请输入第三个整数: ");
        int num3 = scanner.nextInt();
        int temp;
        if (num1 > num2) {
            temp = num1;
            num1 = num2;
            num2 = temp;
        }if (num1 > num3) {
            temp = num1;
            num1 = num3;
            num3 = temp;
        }if (num2 > num3) {
            temp = num2;
            num2 = num3;
            num3 = temp;
        }
        System.out.println("从小到大排序后的结果是: " + num1 + " " + num2 + " " + num3);
        scanner.close();
    }
}
